/**
 * This class represents a Player and holds the player's name, credits, and skill point allocations.
 * @author Stanley Ayzenberg, Araya Zaesim, Michelle Partogi, Adam Perez
 * @version 1.0
 */
public class Player implements java.io.Serializable {

	private int engineerPoints;
	private int fighterPoints;
	private int pilotPoints;
	private int traderPoints;
	private int credits;
	private String name;
	private SpaceShip ship;
	private int[] startingGoods = new int[10];
	public Player(String name, int engineerPoints,int fighterPoints, int pilotPoints, int traderPoints, int money) {
		this.engineerPoints = engineerPoints;
		this.fighterPoints = fighterPoints;
		this.pilotPoints = pilotPoints;
		this.traderPoints = traderPoints;
		this.credits = money;
		this.name = name;
		for (int i = 0; i < 10; i++) {
			startingGoods[i] = 0;
		}	
		this.ship = new SpaceShip("Gnat", startingGoods);
		System.out.println("Name: " + this.name);
		System.out.println("Skill Points");
		System.out.println("Pilot: " + this.pilotPoints);
		System.out.println("Fighter: " + this.fighterPoints);
		System.out.println("Trader: " + this.traderPoints);
		System.out.println("Engineer: " + this.engineerPoints);
		System.out.println("Credits: " + this.credits);
		System.out.println("Added Gnat spaceship to inventory");
	}
	
	/**
	 * Returns the player's credits
	 * @return The player's credits
	 */
	public int getCredits() {
		return credits;
	}
	
	/**
	 * Sets the player's number of credits
	 * @param money Player's credits
	 */
	public void setCredits(int money) {
		credits = money;
	}
	
	/**
	 * Returns the player's engineer points
	 * @return The player's engineer points
	 */
	public int getEngineerPoints() {
		return engineerPoints;
	}
	
	/**
	 * Returns the player's pilot points
	 * @return The player's pilot points
	 */
	public int getPilotPoints() {
		return pilotPoints;
	}
	
	/**
	 * Returns the player's trader points
	 * @return The player's trader points
	 */
	public int getTraderPoints() {
		return traderPoints;
	}
	
	/**
	 * Returns the player's fighter points
	 * @return The player's fighter points
	 */
	public int getFightPoints() {
		return fighterPoints;
	}
	public String getName() {
		return name;
	}
	public SpaceShip getShip() {
		return ship;
	}
	
}
